package com.wzy.portfolio.model;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Schema(description = "股票价格对象")
@Data
public class StockPriceDto {

    @Schema(description = "股票名")
    private String stockName;

    @Schema(description = "股票编码")
    private String stockCode;

    @Schema(description = "价格观测时间")
    private String priceTime;

    @Schema(description = "昨日收盘价")
    private double yestedayPrice;

    @Schema(description = "开盘价")
    private double openPrice;

    @Schema(description = "当前实时价格")
    private double currentPrice;

    @Schema(description = "当日最高价")
    private double maxPrice;

    @Schema(description = "当日最低价")
    private double minPrice;

    @Schema(description = "实时涨跌幅")
    private double changePct;

    @Schema(description = "5日均价")
    private Double avgPrice5;

    @Schema(description = "10日均价")
    private Double avgPrice10;

    @Schema(description = "30日均价")
    private Double avgPrice30;

    @Schema(description = "成交量")
    private Double volume;

    @Schema(description = "成交额")
    private Double turnover;

    @Schema(description = "当日振幅")
    private Double amplitude;

    @Override
    public String toString() {
        return stockName+"["+priceTime+"],开盘:"+openPrice+",收盘:"+currentPrice+",最高:"+maxPrice+",最低:"+minPrice+",涨跌幅:"+changePct;
    }

}
